 import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
	routes: [{
			path: '/',
			redirect: '/home'
		},
		{
			path: '/login',
			component: resolve => require(['../components/common/login.vue'], resolve)
		},
		{
			path: '/welcome',
			component: resolve => require(['../components/page/Welcome.vue'], resolve)
		},
//		{
//			path:'/authPC/:agentkey',
//			props: true,
//			component: resolve => require(['../components/common/authPC.vue'], resolve)
//	
//		},
		{
			path:'/authpc',
			props:true,
			component: resolve => require(['../components/common/authPC.vue'], resolve)
	
		},
		{
			path:'/HomeDD/:menukey',
			props: true,
			component: resolve => require(['../components/common/HomeDD.vue'], resolve)
	
		},
		{
			path: '/home',
			component: resolve => require(['../components/common/Home.vue'], resolve),
			children: [{
					path: '/',
					redirect: '/md/welcome'
					
				},
				{
					path: '/md/:filename',
					props: true,
					component: resolve => require(['../components/common/markdown.vue'], resolve)
				} , 
				{
					path: '/sys/user',
					component: resolve => require(['../components/sys/user.vue'], resolve)
					,meta:{title: '系统管理->用户管理'}
				},
				{
					path: '/sys/menu',
					component: resolve => require(['../components/sys/menu.vue'], resolve)
					,meta:{title: '系统管理->菜单管理'}
				}, 
				{
					path: '/sys/power',
					component: resolve => require(['../components/sys/power.vue'], resolve)
					,meta:{title: '系统管理->权限管理'}
				}, 
				{
					path: '/sys/role',
					component: resolve => require(['../components/sys/role.vue'], resolve)
					,meta:{title: '系统管理->角色管理'}
				}, 
				{
					path: '/sys/dict',
					component: resolve => require(['../components/sys/dict.vue'], resolve)
					,meta:{title: '系统管理->字典管理'}
				}, 
				{
					path: '/sys/mavonEditor',
					component: resolve => require(['../components/sys/mavonEditor.vue'], resolve)
					,meta:{title: '系统管理->文本编辑'}
				}, 
				{
					path: '/sys/CMD_privilege_manage',
					component: resolve => require(['../components/sys/CMD_privilege_manage.vue'], resolve)
					,meta:{title: '系统管理->CMD权限管理'}
				}
			]
		},
	]
})